﻿using Volo.Abp;

namespace Shared.Service.DataPermissions
{
    public class BrandDataPermissionScope
    {
        /// <summary>
        /// 
        /// </summary>
        public DataPermissionState State { get; }

        public string BrandId { get; }

        /// <summary>
        /// 没启用的
        /// </summary>
        public static readonly BrandDataPermissionScope Disable =
            new BrandDataPermissionScope(DataPermissionState.Disable);

        /// <summary>
        /// 没启用的
        /// </summary>
        public static BrandDataPermissionScope Null = new BrandDataPermissionScope(DataPermissionState.Null);

        /// <summary>
        /// 
        /// </summary>
        public static BrandDataPermissionScope All = new BrandDataPermissionScope(DataPermissionState.All);

        /// <summary>
        /// 
        /// </summary>
        public static BrandDataPermissionScope YouLu = new BrandDataPermissionScope("YOULU");

        /// <summary>
        /// 
        /// </summary>
        /// <param name="state"></param>
        protected BrandDataPermissionScope(DataPermissionState state)
        {
            State = state;
        }

        public BrandDataPermissionScope(string brandId)
            : this(DataPermissionState.Normal)
        {
            BrandId = Check.NotNullOrWhiteSpace(brandId, nameof(brandId));
        }
    }
}
